
/**
 * 注册信息审核
 * 
 * @type Number
 */
/**
 * 没有审核的数据源是否加载
 * 
 * @type Number 1：加载；0：没有加载
 */
var notcheck_result_storeisload = 0;
/**
 * 通过审核的数据源是否加载
 * 
 * @type Number 1：加载；0：没有加载
 */
var passcheck_result_Storeisload = 0;
/**
 * 没有通过审核的数据源是否加载
 * 
 * @type Number 1：加载；0：没有加载
 */
var notpass_result_storeisload = 0;

/**
 * 注册信息审核
 */
searchMenu = Ext.extend(Ext.menu.Menu, {
	constructor : function() {
		searchMenu.superclass.constructor.call(this, {
			items : [{
						text : '按照企业名称查询',
						handler : this.enterprisename,
						scope : this,
						iconCls : 'search'
					}, {
						text : '按照城市查询',
						// handler : this.city,
						scope : this,
						hidden : user_city + 1,
						menu : {
							items : [
									// stick any markup in a menu
									'<b class="menu-title"><font color="red">选择相应的城市</font></b>',
									{
										text : '杭州',
										checked : false,
										group : 'theme',
										checkHandler : this.onCityCheck,
										scope : this
									}, {
										text : '宁波',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onCityCheck
									}, {
										text : '温州',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onCityCheck
									}, {
										text : '绍兴',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onCityCheck
									}, {
										text : '嘉兴',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onCityCheck
									}, {
										text : '湖州',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onCityCheck
									}, {
										text : '金华',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onCityCheck
									}, {
										text : '台州',
										checked : false,
										scope : this,
										group : 'theme',
										checkHandler : this.onCityCheck
									}, {
										text : '舟山',
										checked : false,
										scope : this,
										group : 'theme',
										checkHandler : this.onCityCheck
									}, {
										text : '丽水',
										checked : false,
										scope : this,
										group : 'theme',
										checkHandler : this.onCityCheck
									}, {
										text : '衢州',
										checked : false,
										scope : this,
										group : 'theme',
										checkHandler : this.onCityCheck
									}, {
										text : '义乌',
										checked : false,
										scope : this,
										group : 'theme',
										checkHandler : this.onCityCheck
									}, {
										text : '省属企业',
										checked : false,
										scope : this,
										group : 'theme',
										checkHandler : this.onCityCheck
									}],
							scope : this
						},
						iconCls : 'search'
					}, {
						text : '按照经济类型查询',
						// handler : this.eco_type,// org_type
						scope : this,
						menu : {
							items : [
									// stick any markup in a menu
									'<b class="menu-title"><font color="red">选择经济类型</font></b>',
									{
										text : '国有企业',
										checked : false,
										group : 'theme',
										checkHandler : this.onEcoTypeCheck,
										scope : this
									}, {
										text : '集体企业',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onEcoTypeCheck
									}, {
										text : '私营企业',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onEcoTypeCheck
									}],
							scope : this
						},
						iconCls : 'search'
					}, {
						text : '按照组织类型查询',
						// handler : this.org_type,
						scope : this,
						menu : {
							items : [
									// stick any markup in a menu
									'<b class="menu-title"><font color="red">选择组织类型</font></b>',
									{
										text : '有限责任公司',
										checked : false,
										group : 'theme',
										checkHandler : this.onOrgTypeCheck,
										scope : this
									}, {
										text : '股份有限公司',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onOrgTypeCheck
									}, {
										text : '股份合作企业',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onOrgTypeCheck
									}, {
										text : '其他企业',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onOrgTypeCheck
									}],
							scope : this
						},
						iconCls : 'search'
					}, {
						text : '按照科技型企业类别查询',
						// handler : this.science_type,
						scope : this,
						menu : {
							items : [
									// stick any markup in a menu
									'<b class="menu-title"><font color="red">选择科技型企业类别</font></b>',
									{
										text : '高新技术企业',
										checked : false,
										group : 'theme',
										checkHandler : function(item, checked) {
											if (checked) {
												this.fireEvent(
														'onScienceTypeCheck',
														'1');
											}
										},
										scope : this
									}, {
										text : '科技型中小企业',
										checked : false,
										group : 'theme',
										checkHandler : function(item, checked) {
											if (checked) {
												this.fireEvent(
														'onScienceTypeCheck',
														'2');
											}
										},
										scope : this
									}, {
										text : '民营科技企业',
										checked : false,
										group : 'theme',
										checkHandler : function(item, checked) {
											if (checked) {
												this.fireEvent(
														'onScienceTypeCheck',
														'3');
											}
										},
										scope : this
									}],
							scope : this
						},
						iconCls : 'search'
					}, {
						text : '按照国民经济行业查询',
						// handler : this.gdp,
						scope : this,
						menu : {
							items : [
									// stick any markup in a menu
									'<b class="menu-title"><font color="red">选择国民经济行业类别</font></b>',
									{
										text : '装备制造业',
										checked : false,
										group : 'theme',
										checkHandler : this.onGdpTypeCheck,
										scope : this
									}, {
										text : '汽车行业',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onGdpTypeCheck
									}, {
										text : '船舶制造行业',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onGdpTypeCheck
									}, {
										text : '医药行业',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onGdpTypeCheck
									}, {
										text : '钢铁行业',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onGdpTypeCheck
									}, {
										text : '电子信息行业',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onGdpTypeCheck
									}, {
										text : '石化行业',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onGdpTypeCheck
									}, {
										text : '纺织行业',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onGdpTypeCheck
									}, {
										text : '轻工食品行业',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onGdpTypeCheck
									}, {
										text : '有色金属',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onGdpTypeCheck
									}, {
										text : '建材行业',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onGdpTypeCheck
									}, {
										text : '光伏等新能源行业',
										checked : false,
										group : 'theme',
										scope : this,
										checkHandler : this.onGdpTypeCheck
									}],
							scope : this
						},
						iconCls : 'search'
					}]
		});
		this.addEvents('search_button');
		/**
		 * 按照科技类型进行检索事件
		 */
		this.addEvents('onScienceTypeCheck');
		/**
		 * 按照城市进行查询
		 */
		this.addEvents('citysearch');
		/**
		 * 按照经济类型进行查询
		 */
		this.addEvents('onEcoTypeCheck');
		/**
		 * 按照组织类型进行查询事件
		 */
		this.addEvents('onOrgTypeCheck');
		/**
		 * 按照国民经济类型进行查询
		 */
		this.addEvents('onGdpTypeCheck');

	},
	/**
	 * 按照企业名称进行查找
	 */
	enterprisename : function() {
		this.fireEvent('search_button', 'name');
	},
	onGdpTypeCheck : function(item, checked) {
		var text = item.text;
		var value = -1;
		if (text == '装备制造业') {
			value = 1;
		} else if (text == '汽车行业') {
			value = 2;
		} else if (text == '船舶制造业') {
			value = 3;
		} else if (text == '医药行业') {
			value = 4;
		} else if (text == '钢铁行业') {
			value = 5;
		} else if (text == '电子信息行业') {
			value = 6;
		} else if (text == '石化行业') {
			value = 7;
		} else if (text == '纺织产业') {
			value = 8;
		} else if (text == '轻工食品行业') {
			value = 9;
		} else if (text == '有色金属行业') {
			value = 10;
		} else if (text == '建材行业') {
			value = 11;
		} else if (text == '光伏等新能源行业') {
			value = 12;
		}
		if (checked)
			this.fireEvent('onGdpTypeCheck', value);
	},
	onScienceTypeCheck : function(item, checked) {
		var text = item.text;
		var value = null;
		if (text == '高新技术企业') {
			value = '1';
		} else if (text == '科技型中小企业') {
			value = '2';
		} else if (text == '民营科技企业') {
			value = '3';
		}
		if (checked) {
			this.fireEvent('onScienceTypeCheck', '3');
		}
	},
	onOrgTypeCheck : function(item, checked) {
		var text = item.text;
		var value = -1;
		if (text == '有限责任公司') {
			value = 1;
		} else if (text == '股份有限公司') {
			value = 2;
		} else if (text == '股份合作企业') {
			value = 3;
		} else if (text == '其他企业') {
			value = 4;
		}
		// alert(value + '=onOrgTypeCheck');
		if (checked)
			this.fireEvent('onOrgTypeCheck', value);
	},
	onEcoTypeCheck : function(item, checked) {
		var text = item.text;
		var value = -1;
		if (text == '国有企业') {
			value = 1;
		} else if (text == '集体企业') {
			value = 2;
		} else if (text == '私营企业') {
			value = 3;
		}
		// alert(value + '=onEcoTypeCheck');
		if (checked)
			this.fireEvent('onEcoTypeCheck', value);
	},
	onCityCheck : function(item, checked) {
		var text = item.text;
		var value = -1;
		if (text == '杭州') {
			value = 1;
		} else if (text == '宁波') {
			value = 2;
		} else if (text == '温州') {
			value = 3;
		} else if (text == '绍兴') {
			value = 4;
		} else if (text == '嘉兴') {
			value = 5;
		} else if (text == '湖州') {
			value = 6;
		} else if (text == '金华') {
			value = 7;
		} else if (text == '台州') {
			value = 8;
		} else if (text == '舟山') {
			value = 9;
		} else if (text == '丽水') {
			value = 10;
		} else if (text == '衢州') {
			value = 11;
		} else if (text == '义乌') {
			value = 12;
		} else if (text == '省属企业') {
			value = 13;
		}
		if (checked)
			this.fireEvent('citysearch', value);
	}
});
/**
 * 下方组合的tabpanel，综合了未审核，审核通过，和审核不通过
 * 
 * @class result_search_tabpanel
 * @extends Ext.TabPanel
 */
result_search_tabpanel = Ext.extend(Ext.TabPanel, {
	/**
	 * 未审核
	 * 
	 * @type
	 */
	notcheck : null,
	/**
	 * 审核通过
	 * 
	 * @type
	 */
	passcheck : null,
	/**
	 * 审核不通过
	 * 
	 * @type
	 */
	notpass : null,
	cfg : null,
	constructor : function(_cfg) {
		this.cfg = _cfg;
		this.notcheck = new notcheck_result_panel();
		this.passcheck = new passcheck_result_panel();
		this.notpass = new notpass_result_panel();
		result_search_tabpanel.superclass.constructor.call(this, {
					region : 'center',
					items : [this.notcheck, this.passcheck, this.notpass],
					activeItem : '0'
				});
		this.on("tabchange", this.tabchange, this);
	},
	tabchange : function(p, newtab) {
		var id = newtab.getId();
		/**
		 * 未审核
		 */
		if (id == 'notcheck_result_panel' && notcheck_result_storeisload == 0) {
			this.notcheck.getStore().proxy = new Ext.data.HttpProxy({
						url : 'zcxxsh/getenterpriinfobyuserroleandcity.action?city_id='
								+ this.cfg.city_id + '&flag=' + 1
					});
			this.notcheck.getStore().load();
			notcheck_result_storeisload = 1;
			notpass_result_storeisload = 0;
			passcheck_result_Storeisload = 0;
		}
		/**
		 * 未通过
		 */
		if (id == 'notpass_result_panel' && notpass_result_storeisload == 0) {
			this.notpass.getStore().proxy = new Ext.data.HttpProxy({
						url : 'zcxxsh/getenterpriinfobyuserroleandcity.action?city_id='
								+ this.cfg.city_id + '&flag=' + 2
					});
			this.notpass.getStore().load();
			notpass_result_storeisload = 1;
			notcheck_result_storeisload = 0;
			passcheck_result_Storeisload = 0;

		}
		/**
		 * 通过
		 */
		if (id == 'passcheck_result_panel' && passcheck_result_Storeisload == 0) {
			this.passcheck.getStore().proxy = new Ext.data.HttpProxy({
						url : 'zcxxsh/getenterpriinfobyuserroleandcity.action?city_id='
								+ this.cfg.city_id + '&flag=' + 3
					});
			this.passcheck.getStore().load();
			passcheck_result_Storeisload = 1;
			notpass_result_storeisload = 0;
			notcheck_result_storeisload = 0;
		}
	}
});
/**
 * 审核结果数据源
 * 
 * @class notcheck_result_panel_store
 * @extends Ext.data.Store
 */
result_panel_store = new Ext.data.Store({
	proxy : new Ext.data.HttpProxy({
				method : 'GET',
				/**
				 * flag = 1 :未审核；flag = 2 ：审核通过；flag=3 ：审核不通过
				 */
				url : 'zcxxsh/getenterpriinfobyuserroleandcity.action?city_id=1'
						+ '&flag=' + 1
			}),
	reader : new Ext.data.JsonReader({
				fields : ['id', 'user_id', 'editable', 'enterprise_state',
						'enterprise_style', 'enterprise_expe_year',
						'enterprise_demo_year',
						'enterprise_is_nationalInnovation',
						'enterprise_updateinfo', 'enterprise_updatestatus',
						'enterprise_name', 'enterprise_address',
						'enterprise_corporate_code', 'enterprise_city',
						'enterprise_postcode',
						'enterprise_corporateRepresentative',
						'enterprise_telephone', 'enterprise_person_incharge',
						'enterprise_phone_incharge', 'enterprise_eco_type',
						'enterprise_org_type', 'enterprise_largest_sharehoder',
						'enterprise_largest_share', 'enterprise_listed_type',
						'enterprise_science_type', 'enterprise_industry_code',
						'enterprise_highsci_authenticate_year',
						'enterprise_highsci_authenticate_department',
						'enterprise_highsci_field', 'enterprise_credit_degree',
						'enterprise_business_field',
						'enterprise_field_closeness',
						'enterprise_major_business', 'enterprise_staff_count',
						'enterprise_staff_collegedegree_count',
						'enterprise_research_staff_count',
						'enterprise_senior_technician_count', 'isCheck']
			}),
	autoLoad : true
});
var unarrsm = new Ext.grid.CheckboxSelectionModel({
			singleSelect : true
		});
/**
 * 没有审核的结果
 * 
 * @class find_enterprise_result_gridpanel
 * @extends Ext.grid.GridPanel
 */
notcheck_result_panel = Ext.extend(Ext.grid.GridPanel, {
	store : null,
	menu : null,
	serachwin : null,
	constructor : function() {
		this.menu = new searchMenu();
		this.store = result_panel_store;
		this.serachwin = new query_by_formpanel_win();
		notcheck_result_panel.superclass.constructor.call(this, {
			id : 'notcheck_result_panel',
			loadMask : {
				msg : '数据加载中...'
			},
			title : '未审核',
			iconCls : 'edit',
			tbar : [{
				text : '审核通过',
				iconCls : 'checkpass',
				handler : function() {
					var grid = this.getSelectionModel().getSelected();
					if (!grid) {
						Ext.Msg.show({
									title : '提示',
									msg : '没有选择相应的数据',
									icon : Ext.Msg.ERROR,
									buttons : Ext.MessageBox.OK
								});
						return;
					} else {
						var userid = grid.get('user_id');
						Ext.Ajax.request({
									url : 'zcxxsh/passcheckenterpriseuser.action',
									scope : this,
									success : function(response, options) {
										if (response.responseText == 'ok') {
											this.getStore().reload();
											notpass_result_storeisload = 0;
											notcheck_result_storeisload = 0;
										}
									},
									params : {
										userid : userid,
										// 审核通过flag = 1，flag = 0审核不通过
										flag : 1
									}
								})
					}
				},
				scope : this
			}, '-', {
				text : '审核不通过',
				iconCls : 'cancel',
				handler : function() {
					var grid = this.getSelectionModel().getSelected();
					if (!grid) {
						Ext.Msg.show({
									title : '提示',
									msg : '没有选择相应的数据',
									icon : Ext.Msg.ERROR,
									buttons : Ext.MessageBox.OK
								});
						return;
					} else {
						var userid = grid.get('user_id');
						Ext.Ajax.request({
									url : 'zcxxsh/passcheckenterpriseuser.action',
									scope : this,
									success : function(response, options) {
										if (response.responseText == 'ok') {
											this.getStore().reload();
											notpass_result_storeisload = 0;
											notcheck_result_storeisload = 0;
										}
									},
									params : {
										userid : userid,
										// 审核通过flag = 1，flag = 0审核不通过
										flag : 0
									}
								})
					}
				},
				scope : this
			}, '-', {
				text : '条件检索方式检索',
				iconCls : 'search',
				menu : this.menu,
				scope : this
			}, '-', {
				text : '移除查询条件',
				iconCls : 'reset',
				scope : this,
				handler : function() {
					this.store.clearFilter();
				}
			}, '->', {
				text : '支持双击查看详细信息',
				disabled : true,
				iconCls : 'star_sun'
			}],
			cm : new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),{
						id : 'enterprise_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'id'
					}, {
						id : 'user_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'user_id'
					}, {
						id : 'editable',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'editable'
					}, {// /////////////////////////////////////////////////////////////
						id : 'enterprise_address',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_address'
					}, {
						id : 'enterprise_post_code',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_post_code'
					}, {
						id : 'enterprise_corporate_code',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_corporate_code'
					}, {
						id : 'enterprise_corporateRepresentative',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_corporateRepresentative'
					}, {
						id : 'enterprise_telephone',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_telephone'
					}, {
						id : 'enterprise_largest_sharehoder',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_largest_sharehoder'
					}, {
						id : 'enterprise_largest_share',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_largest_share'
					}, {
						id : 'enterprise_listed_type',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_listed_type'
					}, {
						id : 'enterprise_science_type',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_science_type'
					}, {
						id : 'enterprise_credit_degree',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_credit_degree'
					}, {
						id : 'enterprise_field_closeness',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_field_closeness'
					}, {
						id : 'enterprise_business_field',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_business_field'
					}, {
						id : 'enterprise_major_business',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_major_business'
					}, {
						id : 'enterprise_staff_count',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_staff_count'
					}, {
						id : 'enterprise_major_business',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_major_business'
					}, {
						id : 'enterprise_staff_collegedegree_count',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_staff_collegedegree_count'
					}, {
						id : 'enterprise_research_staff_count',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_research_staff_count'
					}, {
						id : 'enterprise_senior_technician_count',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_senior_technician_count'
					}, {// /////////////////////////////////////////////////////////////////////
						header : '企业名称',
						width : 60,
						dataIndex : 'enterprise_name',
						id : 'enterprise_name',
						sortable : true,
						align : 'center'
					}, {
						header : '所属市',
						width : 60,
						dataIndex : 'enterprise_city',
						sortable : true,
						renderer : getCityName,
						align : 'center'
					}, {
						header : '试点工作负责人',
						width : 60,
						dataIndex : 'enterprise_person_incharge',
						sortable : true,
						align : 'center'
					}, {
						header : '负责人电话',
						width : 60,
						dataIndex : 'enterprise_phone_incharge',
						sortable : true,
						align : 'center'
					}, {
						header : '经济类型',
						width : 60,
						dataIndex : 'enterprise_eco_type',
						sortable : true,
						renderer : getEnterprise_eco_typeName,
						align : 'center'
					}, {
						header : '组织类型',
						width : 60,
						dataIndex : 'enterprise_org_type',
						sortable : true,
						renderer : getEnterprise_org_typeName,
						align : 'center'
					}, {
						header : '科技型企业类别',
						width : 60,
						dataIndex : 'enterprise_science_type',
						sortable : true,
						renderer : getEnterprise_science_typeName,
						align : 'center'
					}, {
						header : '所属国民经济行业',
						width : 60,
						dataIndex : 'enterprise_industry_code',
						sortable : true,
						renderer : getProfessionName,
						align : 'center'
					}, {
						header : '审核状态',
						width : 60,
						dataIndex : 'isCheck',
						renderer : getIsCheckName,
						sortable : false,
						align : 'center'
					}]),
			autoExpandColumn : 'enterprise_name',
			ds : this.store,

			stripeRows : true,
			split : true,
			viewConfig : {
				forceFit : true
			},
			sm : unarrsm
		});
		this.on('rowdblclick', this.rowdblclick, this);
		this.menu.on('search_button', function(type) {
					this.serachwin.show(Ext.getDom('login_view'));
				}, this);
		this.menu.on('citysearch', function(value) {
					this.store.filter('enterprise_city', value, true, false);
				}, this);
		this.menu.on('onScienceTypeCheck', function(value) {
					this.store.filter('enterprise_science_type', value, true,
							false);
				}, this);
		this.menu.on('onEcoTypeCheck', function(value) {
					this.store
							.filter('enterprise_eco_type', value, true, false);
				}, this);
		this.menu.on('onOrgTypeCheck', function(value) {
					this.store
							.filter('enterprise_org_type', value, true, false);
				}, this);
		this.menu.on('onGdpTypeCheck', function(value) {
					this.store.filter('enterprise_industry_code', value, true,
							false);
				}, this);
		this.serachwin.on('enterprisenamesearch', function(name) {
					this.store.filter('enterprise_name', name, true, false);
				}, this);

	},
	rowdblclick : function(g, r, e) {
		var ro = this.getSelectionModel().getSelected();
		var enterprise_name = ro.get('enterprise_name');
		var enterprise_city = ro.get('enterprise_city');
		var enterprise_address = ro.get('enterprise_address');
		var enterprise_post_code = ro.get('enterprise_post_code');
		var enterprise_corporate_code = ro.get('enterprise_corporate_code');
		var enterprise_corporateRepresentative = ro
				.get('enterprise_corporateRepresentative');
		var enterprise_telephone = ro.get('enterprise_telephone');
		var enterprise_person_incharge = ro.get('enterprise_person_incharge');
		var enterprise_phone_incharge = ro.get('enterprise_phone_incharge');
		var enterprise_eco_type = ro.get('enterprise_eco_type');
		var enterprise_org_type = ro.get('enterprise_org_type');
		var enterprise_largest_sharehoder = ro
				.get('enterprise_largest_sharehoder');
		var enterprise_largest_share = ro.get('enterprise_largest_share');
		var enterprise_listed_type = ro.get('enterprise_listed_type');
		var enterprise_science_type = ro.get('enterprise_science_type');
		var enterprise_industry_code = ro.get('enterprise_industry_code');
		var enterprise_credit_degree = ro.get('enterprise_credit_degree');
		var enterprise_field_closeness = ro.get('enterprise_field_closeness');
		var enterprise_business_field = ro.get('enterprise_business_field');
		var enterprise_major_business = ro.get('enterprise_major_business');
		var enterprise_staff_count = ro.get('enterprise_staff_count');
		var enterprise_staff_collegedegree_count = ro
				.get('enterprise_staff_collegedegree_count');
		var enterprise_research_staff_count = ro
				.get('enterprise_research_staff_count');
		var enterprise_senior_technician_count = ro
				.get('enterprise_senior_technician_count');
		var cfg = {
			enterprise_name : enterprise_name,
			enterprise_city : enterprise_city,
			enterprise_address : enterprise_address,
			enterprise_post_code : enterprise_post_code,
			enterprise_corporate_code : enterprise_corporate_code,
			enterprise_corporateRepresentative : enterprise_corporateRepresentative,
			enterprise_telephone : enterprise_telephone,
			enterprise_person_incharge : enterprise_person_incharge,
			enterprise_phone_incharge : enterprise_phone_incharge,
			enterprise_eco_type : enterprise_eco_type,
			enterprise_org_type : enterprise_org_type,
			enterprise_largest_sharehoder : enterprise_largest_sharehoder,
			enterprise_largest_share : enterprise_largest_share,
			enterprise_listed_type : enterprise_listed_type,
			enterprise_science_type : enterprise_science_type,
			enterprise_industry_code : enterprise_industry_code,
			enterprise_credit_degree : enterprise_credit_degree,
			enterprise_field_closeness : enterprise_field_closeness,
			enterprise_business_field : enterprise_business_field,
			enterprise_major_business : enterprise_major_business,
			enterprise_staff_count : enterprise_staff_count,
			enterprise_staff_collegedegree_count : enterprise_staff_collegedegree_count,
			enterprise_research_staff_count : enterprise_research_staff_count,
			enterprise_senior_technician_count : enterprise_senior_technician_count
		};
		var win = new enterprise_show_win(cfg);
		win.show(Ext.getDom('login_view'));

	}
});
/**
 * 审核通过
 * 
 * @class passcheck_result_panel
 * @extends Ext.grid.GridPanel
 */
passcheck_result_panel = Ext.extend(Ext.grid.GridPanel, {
	store : null,
	menu : null,
	serachwin : null,
	constructor : function() {
		this.store = result_panel_store;
		this.menu = new searchMenu();
		// this.store = result_panel_store;
		this.serachwin = new query_by_formpanel_win();
		passcheck_result_panel.superclass.constructor.call(this, {
					id : 'passcheck_result_panel',
					loadMask : {
						msg : '数据加载中...'
					},
					title : '审核通过',
					iconCls : 'edit',
					cm : new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),{
								id : 'enterprise_id',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'id'
							}, {
								id : 'user_id',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'user_id'
							}, {
								id : 'editable',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'editable'
							}, {// /////////////////////////////////////////////////////////////
								id : 'enterprise_address',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_address'
							}, {
								id : 'enterprise_post_code',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_post_code'
							}, {
								id : 'enterprise_corporate_code',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_corporate_code'
							}, {
								id : 'enterprise_corporateRepresentative',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_corporateRepresentative'
							}, {
								id : 'enterprise_telephone',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_telephone'
							}, {
								id : 'enterprise_largest_sharehoder',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_largest_sharehoder'
							}, {
								id : 'enterprise_largest_share',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_largest_share'
							}, {
								id : 'enterprise_listed_type',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_listed_type'
							}, {
								id : 'enterprise_science_type',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_science_type'
							}, {
								id : 'enterprise_credit_degree',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_credit_degree'
							}, {
								id : 'enterprise_field_closeness',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_field_closeness'
							}, {
								id : 'enterprise_business_field',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_business_field'
							}, {
								id : 'enterprise_major_business',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_major_business'
							}, {
								id : 'enterprise_staff_count',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_staff_count'
							}, {
								id : 'enterprise_major_business',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_major_business'
							}, {
								id : 'enterprise_staff_collegedegree_count',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_staff_collegedegree_count'
							}, {
								id : 'enterprise_research_staff_count',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_research_staff_count'
							}, {
								id : 'enterprise_senior_technician_count',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_senior_technician_count'
							}, {// /////////////////////////////////////////////////////////////////////
								header : '企业名称',
								width : 60,
								dataIndex : 'enterprise_name',
								id : 'enterprise_name',
								sortable : true,
								align : 'center'
							}, {
								header : '所属市',
								width : 60,
								dataIndex : 'enterprise_city',
								sortable : true,
								renderer : getCityName,
								align : 'center'
							}, {
								header : '试点工作负责人',
								width : 60,
								dataIndex : 'enterprise_person_incharge',
								sortable : true,
								align : 'center'
							}, {
								header : '负责人电话',
								width : 60,
								dataIndex : 'enterprise_phone_incharge',
								sortable : true,
								align : 'center'
							}, {
								header : '经济类型',
								width : 60,
								dataIndex : 'enterprise_eco_type',
								sortable : true,
								renderer : getEnterprise_eco_typeName,
								align : 'center'
							}, {
								header : '组织类型',
								width : 60,
								dataIndex : 'enterprise_org_type',
								sortable : true,
								renderer : getEnterprise_org_typeName,
								align : 'center'
							}, {
								header : '科技型企业类别',
								width : 60,
								dataIndex : 'enterprise_science_type',
								sortable : true,
								renderer : getEnterprise_science_typeName,
								align : 'center'
							}, {
								header : '所属国民经济行业',
								width : 60,
								dataIndex : 'enterprise_industry_code',
								sortable : true,
								renderer : getProfessionName,
								align : 'center'
							}, {
								header : '审核状态',
								width : 60,
								dataIndex : 'isCheck',
								renderer : getIsCheckName,
								sortable : false,
								align : 'center'
							}]),
					autoExpandColumn : 'enterprise_name',
					ds : this.store,
					stripeRows : true,
					split : true,
					viewConfig : {
						forceFit : true
					},
					tbar : [{
								text : '条件检索方式检索',
								iconCls : 'search',
								menu : this.menu,
								scope : this
							}, '-', {
								text : '移除查询条件',
								iconCls : 'reset',
								scope : this,
								handler : function() {
									this.store.clearFilter();
								}
							}, '->', {
								text : '支持双击查看详细信息',
								disabled : true,
								iconCls : 'star_sun'
							}]
				});
		this.on('rowdblclick', this.rowdblclick, this);
		this.menu.on('search_button', function(type) {
					this.serachwin.show(Ext.getDom('login_view'));
				}, this);
		this.menu.on('citysearch', function(value) {
					this.store.filter('enterprise_city', value, true, false);
				}, this);
		this.menu.on('onScienceTypeCheck', this.onScienceTypeCheck, this);
		this.menu.on('onEcoTypeCheck', function(value) {
					this.store
							.filter('enterprise_eco_type', value, true, false);
				}, this);
		this.menu.on('onOrgTypeCheck', function(value) {
					this.store
							.filter('enterprise_org_type', value, true, false);
				}, this);
		this.menu.on('onGdpTypeCheck', function(value) {
					this.store.filter('enterprise_industry_code', value, true,
							false);
				}, this);
		this.serachwin.on('enterprisenamesearch', function(name) {
					this.store.filter('enterprise_name', name, true, false);
				}, this);
	},
	onScienceTypeCheck : function(v) {
		this.getStore().filter('enterprise_science_type', v, true, false);
	},
	rowdblclick : function(g, r, e) {
		var ro = this.getSelectionModel().getSelected();
		var enterprise_name = ro.get('enterprise_name');
		var enterprise_city = ro.get('enterprise_city');
		var enterprise_address = ro.get('enterprise_address');
		var enterprise_post_code = ro.get('enterprise_post_code');
		var enterprise_corporate_code = ro.get('enterprise_corporate_code');
		var enterprise_corporateRepresentative = ro
				.get('enterprise_corporateRepresentative');
		var enterprise_telephone = ro.get('enterprise_telephone');
		var enterprise_person_incharge = ro.get('enterprise_person_incharge');
		var enterprise_phone_incharge = ro.get('enterprise_phone_incharge');
		var enterprise_eco_type = ro.get('enterprise_eco_type');
		var enterprise_org_type = ro.get('enterprise_org_type');
		var enterprise_largest_sharehoder = ro
				.get('enterprise_largest_sharehoder');
		var enterprise_largest_share = ro.get('enterprise_largest_share');
		var enterprise_listed_type = ro.get('enterprise_listed_type');
		var enterprise_science_type = ro.get('enterprise_science_type');
		var enterprise_industry_code = ro.get('enterprise_industry_code');
		var enterprise_credit_degree = ro.get('enterprise_credit_degree');
		var enterprise_field_closeness = ro.get('enterprise_field_closeness');
		var enterprise_business_field = ro.get('enterprise_business_field');
		var enterprise_major_business = ro.get('enterprise_major_business');
		var enterprise_staff_count = ro.get('enterprise_staff_count');
		var enterprise_staff_collegedegree_count = ro
				.get('enterprise_staff_collegedegree_count');
		var enterprise_research_staff_count = ro
				.get('enterprise_research_staff_count');
		var enterprise_senior_technician_count = ro
				.get('enterprise_senior_technician_count');
		var cfg = {
			enterprise_name : enterprise_name,
			enterprise_city : enterprise_city,
			enterprise_address : enterprise_address,
			enterprise_post_code : enterprise_post_code,
			enterprise_corporate_code : enterprise_corporate_code,
			enterprise_corporateRepresentative : enterprise_corporateRepresentative,
			enterprise_telephone : enterprise_telephone,
			enterprise_person_incharge : enterprise_person_incharge,
			enterprise_phone_incharge : enterprise_phone_incharge,
			enterprise_eco_type : enterprise_eco_type,
			enterprise_org_type : enterprise_org_type,
			enterprise_largest_sharehoder : enterprise_largest_sharehoder,
			enterprise_largest_share : enterprise_largest_share,
			enterprise_listed_type : enterprise_listed_type,
			enterprise_science_type : enterprise_science_type,
			enterprise_industry_code : enterprise_industry_code,
			enterprise_credit_degree : enterprise_credit_degree,
			enterprise_field_closeness : enterprise_field_closeness,
			enterprise_business_field : enterprise_business_field,
			enterprise_major_business : enterprise_major_business,
			enterprise_staff_count : enterprise_staff_count,
			enterprise_staff_collegedegree_count : enterprise_staff_collegedegree_count,
			enterprise_research_staff_count : enterprise_research_staff_count,
			enterprise_senior_technician_count : enterprise_senior_technician_count
		};
		var win = new enterprise_show_win(cfg);
		win.show(Ext.getDom('login_view'));

	}

});
/**
 * 审核未通过
 * 
 * @class notpass_result_panel
 * @extends Ext.grid.GridPanel
 */
notpass_result_panel = Ext.extend(Ext.grid.GridPanel, {
	store : null,
	menu : null,
	serachwin : null,
	constructor : function() {
		this.store = result_panel_store;
		this.menu = new searchMenu();
		// this.store = result_panel_store;
		this.serachwin = new query_by_formpanel_win();
		notpass_result_panel.superclass.constructor.call(this, {
					id : 'notpass_result_panel',
					loadMask : {
						msg : '数据加载中...'
					},
					title : '审核不通过',
					iconCls : 'edit',
					cm : new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),{
								id : 'enterprise_id',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'id'
							}, {
								id : 'user_id',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'user_id'
							}, {
								id : 'editable',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'editable'
							}, {// /////////////////////////////////////////////////////////////
								id : 'enterprise_address',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_address'
							}, {
								id : 'enterprise_post_code',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_post_code'
							}, {
								id : 'enterprise_corporate_code',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_corporate_code'
							}, {
								id : 'enterprise_corporateRepresentative',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_corporateRepresentative'
							}, {
								id : 'enterprise_telephone',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_telephone'
							}, {
								id : 'enterprise_largest_sharehoder',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_largest_sharehoder'
							}, {
								id : 'enterprise_largest_share',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_largest_share'
							}, {
								id : 'enterprise_listed_type',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_listed_type'
							}, {
								id : 'enterprise_science_type',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_science_type'
							}, {
								id : 'enterprise_credit_degree',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_credit_degree'
							}, {
								id : 'enterprise_field_closeness',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_field_closeness'
							}, {
								id : 'enterprise_business_field',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_business_field'
							}, {
								id : 'enterprise_major_business',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_major_business'
							}, {
								id : 'enterprise_staff_count',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_staff_count'
							}, {
								id : 'enterprise_major_business',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_major_business'
							}, {
								id : 'enterprise_staff_collegedegree_count',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_staff_collegedegree_count'
							}, {
								id : 'enterprise_research_staff_count',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_research_staff_count'
							}, {
								id : 'enterprise_senior_technician_count',
								header : '',
								width : 80,
								hidden : true,
								sortable : true,
								dataIndex : 'enterprise_senior_technician_count'
							}, {// /////////////////////////////////////////////////////////////////////
								header : '企业名称',
								width : 60,
								dataIndex : 'enterprise_name',
								id : 'enterprise_name',
								sortable : true,
								align : 'center'
							}, {
								header : '所属市',
								width : 60,
								dataIndex : 'enterprise_city',
								sortable : true,
								renderer : getCityName,
								align : 'center'
							}, {
								header : '试点工作负责人',
								width : 60,
								dataIndex : 'enterprise_person_incharge',
								sortable : true,
								align : 'center'
							}, {
								header : '负责人电话',
								width : 60,
								dataIndex : 'enterprise_phone_incharge',
								sortable : true,
								align : 'center'
							}, {
								header : '经济类型',
								width : 60,
								dataIndex : 'enterprise_eco_type',
								sortable : true,
								renderer : getEnterprise_eco_typeName,
								align : 'center'
							}, {
								header : '组织类型',
								width : 60,
								dataIndex : 'enterprise_org_type',
								sortable : true,
								renderer : getEnterprise_org_typeName,
								align : 'center'
							}, {
								header : '科技型企业类别',
								width : 60,
								dataIndex : 'enterprise_science_type',
								sortable : true,
								renderer : getEnterprise_science_typeName,
								align : 'center'
							}, {
								header : '所属国民经济行业',
								width : 60,
								dataIndex : 'enterprise_industry_code',
								sortable : true,
								renderer : getProfessionName,
								align : 'center'
							}, {
								header : '审核状态',
								width : 60,
								dataIndex : 'isCheck',
								renderer : getIsCheckName,
								sortable : false,
								align : 'center'
							}]),
					autoExpandColumn : 'enterprise_name',
					ds : this.store,

					stripeRows : true,
					split : true,
					viewConfig : {
						forceFit : true
					},
					tbar : [{
								text : '条件检索方式检索',
								iconCls : 'search',
								menu : this.menu,
								scope : this
							}, '-', {
								text : '移除查询条件',
								iconCls : 'reset',
								scope : this,
								handler : function() {
									this.store.clearFilter();
								}
							}, '->', {
								text : '支持双击查看详细信息',
								disabled : true,
								iconCls : 'star_sun'
							}]
				});
		this.on('rowdblclick', this.rowdblclick, this);
		this.menu.on('search_button', function(type) {
					this.serachwin.show(Ext.getDom('login_view'));
				}, this);
		this.menu.on('citysearch', function(value) {
					this.store.filter('enterprise_city', value, false, false);
				}, this);
		this.menu.on('onScienceTypeCheck', function(value) {
					this.store.filter('enterprise_science_type', value, false,
							false);
				}, this);
		this.menu.on('onEcoTypeCheck', function(value) {
					this.store
							.filter('enterprise_eco_type', value, false, false);
				}, this);
		this.menu.on('onOrgTypeCheck', function(value) {
					this.store
							.filter('enterprise_org_type', value, false, false);
				}, this);
		this.menu.on('onGdpTypeCheck', function(value) {
					this.store.filter('enterprise_industry_code', value, false,
							false);
				}, this);
		this.serachwin.on('enterprisenamesearch', function(name) {
					this.store.filter('enterprise_name', name, false, false);
				}, this);
	},
	rowdblclick : function(g, r, e) {
		var ro = this.getSelectionModel().getSelected();
		var enterprise_name = ro.get('enterprise_name');
		var enterprise_city = ro.get('enterprise_city');
		var enterprise_address = ro.get('enterprise_address');
		var enterprise_post_code = ro.get('enterprise_post_code');
		var enterprise_corporate_code = ro.get('enterprise_corporate_code');
		var enterprise_corporateRepresentative = ro
				.get('enterprise_corporateRepresentative');
		var enterprise_telephone = ro.get('enterprise_telephone');
		var enterprise_person_incharge = ro.get('enterprise_person_incharge');
		var enterprise_phone_incharge = ro.get('enterprise_phone_incharge');
		var enterprise_eco_type = ro.get('enterprise_eco_type');
		var enterprise_org_type = ro.get('enterprise_org_type');
		var enterprise_largest_sharehoder = ro
				.get('enterprise_largest_sharehoder');
		var enterprise_largest_share = ro.get('enterprise_largest_share');
		var enterprise_listed_type = ro.get('enterprise_listed_type');
		var enterprise_science_type = ro.get('enterprise_science_type');
		var enterprise_industry_code = ro.get('enterprise_industry_code');
		var enterprise_credit_degree = ro.get('enterprise_credit_degree');
		var enterprise_field_closeness = ro.get('enterprise_field_closeness');
		var enterprise_business_field = ro.get('enterprise_business_field');
		var enterprise_major_business = ro.get('enterprise_major_business');
		var enterprise_staff_count = ro.get('enterprise_staff_count');
		var enterprise_staff_collegedegree_count = ro
				.get('enterprise_staff_collegedegree_count');
		var enterprise_research_staff_count = ro
				.get('enterprise_research_staff_count');
		var enterprise_senior_technician_count = ro
				.get('enterprise_senior_technician_count');
		var cfg = {
			enterprise_name : enterprise_name,
			enterprise_city : enterprise_city,
			enterprise_address : enterprise_address,
			enterprise_post_code : enterprise_post_code,
			enterprise_corporate_code : enterprise_corporate_code,
			enterprise_corporateRepresentative : enterprise_corporateRepresentative,
			enterprise_telephone : enterprise_telephone,
			enterprise_person_incharge : enterprise_person_incharge,
			enterprise_phone_incharge : enterprise_phone_incharge,
			enterprise_eco_type : enterprise_eco_type,
			enterprise_org_type : enterprise_org_type,
			enterprise_largest_sharehoder : enterprise_largest_sharehoder,
			enterprise_largest_share : enterprise_largest_share,
			enterprise_listed_type : enterprise_listed_type,
			enterprise_science_type : enterprise_science_type,
			enterprise_industry_code : enterprise_industry_code,
			enterprise_credit_degree : enterprise_credit_degree,
			enterprise_field_closeness : enterprise_field_closeness,
			enterprise_business_field : enterprise_business_field,
			enterprise_major_business : enterprise_major_business,
			enterprise_staff_count : enterprise_staff_count,
			enterprise_staff_collegedegree_count : enterprise_staff_collegedegree_count,
			enterprise_research_staff_count : enterprise_research_staff_count,
			enterprise_senior_technician_count : enterprise_senior_technician_count
		};
		var win = new enterprise_show_win(cfg);
		win.show(Ext.getDom('login_view'));

	}
});
/**
 * 总的组装面板
 * 
 * @class zcxxsh_panel
 * @extends Ext.Panel
 */
zcxxsh_panel = Ext.extend(Ext.Panel, {
			north : null,
			center : null,
			cfg : null,
			constructor : function() {
				this.cfg = {
					city_id : user_city
				};
				this.center = new result_search_tabpanel(this.cfg);
				zcxxsh_panel.superclass.constructor.call(this, {
							layout : 'border',
							defaults : {
								split : true
							},
							items : [this.center]
						});
			}
		});
// ////////////////// 搜索小面板
query_by_formpanel = Ext.extend(Ext.form.FormPanel, {
			cfg : null,
			constructor : function() {
				query_by_formpanel.superclass.constructor.call(this, {
							frame : true,
							height : 100,
							bodyStyle : 'padding: 10px 10px 0 10px;',
							labelWidth : 90,
							labelAlign : 'right',
							defaults : {
								anchor : '95%',
								allowBlank : false,
								msgTarget : 'side'
							},
							items : [{
										xtype : 'textfield',
										fieldLabel : '企业名称',
										anchor : '99%',
										name : 'enterprise_name'

									}],
							buttons : [{
										text : '查询',
										iconCls : 'itemadd',
										handler : this.findByName,
										scope : this
									}]
						});
				/**
				 * 为该面板增加按照名称检索事件
				 */
				this.addEvents('enterprisenamesearch');
			},
			findByName : function() {
				var name = this.getForm().findField('enterprise_name')
						.getValue();
				if (name == '') {
					Ext.Msg.show({
								title : '提示',
								msg : '你没有输入数据',
								icon : Ext.Msg.WARNING,
								buttons : Ext.Msg.OK
							});
					return;
				} else {
					this.fireEvent('enterprisenamesearch', name);

				}
			}
		});
query_by_formpanel_win = Ext.extend(Ext.Window, {
			formpanel : null,
			constructor : function() {
				this.formpanel = new query_by_formpanel();
				query_by_formpanel_win.superclass.constructor.call(this, {
							width : 400,
							title : '按照企业名称进行查询企业',
							iconCls : 'search',
							layout : 'fit',
							closeAction : 'hide',
							frame : true,
							modal : true,
							plain : true,
							items : this.formpanel
						});
				this.addEvents('enterprisenamesearch');
				this.formpanel.on('enterprisenamesearch', function(name) {
							this.fireEvent('enterprisenamesearch', name);
							this.hide();
						}, this);
			}

		})
// /////////////////
Ext.extend(demo.module, {
			init : function() {
				this.body = new zcxxsh_panel();
				this.main.add(this.body);
				this.main.doLayout();
			}
		});
/**
 * this.cfg = _cfg; this.city_store = new Ext.data.SimpleStore({ fields :
 * ['name', 'id'], data : [['所有', '0'], ['杭州', '1'], ['宁波', '2'], ['温州', '3'],
 * ['绍兴', '4'], ['嘉兴', '5'], ['湖州', '6'], ['金华', '7'], ['台州', '8'], ['舟山', '9'],
 * ['丽水', '10'], ['衢州', '11'], ['义乌', '12'], ['省属企业', '13']] });
 * this.enterprise_eco_type_store = new Ext.data.SimpleStore({ fields : ['name',
 * 'id'], data : [['所有', '0'], ['国有企业', '1'], ['集体企业', '2'], ['私营企业', '3']] });
 * this.enterprise_org_type_store = new Ext.data.SimpleStore({ fields : ['name',
 * 'id'], data : [['所有', '0'], ['有限责任公司', '1'], ['股份有限公司', '2'], ['股份合作企业',
 * '3'], ['其他企业', '4']] }); this.enterprise_science_type_store = new
 * Ext.data.SimpleStore({ fields : ['name', 'id'], data : [['所有', '0'],
 * ['高新技术企业', '1'], ['科技型中小企业', '2'], ['民营科技企业', '3']] }); this.gdp_store = new
 * Ext.data.SimpleStore({ fields : ['name', 'id'], data : [['所有', '0'],
 * ['装备制造业', '1'], ['汽车行业', '2'], ['船舶制造业', '3'], ['医药行业', '4'], ['钢铁行业', '5'],
 * ['电子信息行业', '6'], ['石化行业', '7'], ['纺织产业', '8'], ['轻工食品行业', '9'], ['有色金属行业',
 * '10'], ['建材行业', '11'], ['光伏等新能源行业', '12']] }); if (this.cfg.type == 'name') {
 * this.item = Ext.util.JSON.decode({ xtype : 'textfield', fieldLabel : '企业名称',
 * anchor : '99%', name : 'enterprise_name' }); } else if (this.cfg.type ==
 * 'city') { this.item = Ext.util.JSON.decode({ xtype : 'combo', fieldLabel :
 * '所属市', hiddenName : 'enterprise_city', triggerAction : 'all', displayField :
 * 'name', value : this.getValue(), disabled : user_city + 1, readOnly : true,
 * valueField : 'id', mode : 'local', anchor : '99%', store : this.city_store
 * }); } else if (this.cfg.type == 'science_type') { this.item =
 * Ext.util.JSON.decode({ xtype : 'combo', value : 0, fieldLabel : '科技型企业类别',
 * hiddenName : 'enterprise_science_type_store', triggerAction : 'all',
 * displayField : 'name', readOnly : true, valueField : 'id', mode : 'local',
 * anchor : '99%', store : this.enterprise_science_type_store }); } else if
 * (this.cfg.type == 'eco_type') { this.item = Ext.util.JSON.decode({ xtype :
 * 'combo', fieldLabel : '经济类型', hiddenName : 'enterprise_eco_type_store',
 * triggerAction : 'all', displayField : 'name', readOnly : true, valueField :
 * 'id', value : 0, mode : 'local', anchor : '99%', store :
 * this.enterprise_eco_type_store }); } else if (this.cfg.type == 'org_type') {
 * this.item = Ext.util.JSON.decode({ xtype : 'combo', value : 0, fieldLabel :
 * '组织类型', hiddenName : 'enterprise_org_type_store', triggerAction : 'all',
 * displayField : 'name', readOnly : true, valueField : 'id', mode : 'local',
 * anchor : '99%', store : this.enterprise_org_type_store }); } else if
 * (this.cfg.type == 'gdp') { this.item = Ext.util.JSON.decode({ xtype :
 * 'combo', fieldLabel : '<font color="red">*</font>所属国民经济行业', hiddenName :
 * 'gdp_store', triggerAction : 'all', value : 0, displayField : 'name',
 * readOnly : true, valueField : 'id', mode : 'local', anchor : '99%', store :
 * this.gdp_store }); }
 */
